'''
Created on 2019��3��23��

@author: Administrator
'''
# -*- coding: Windows-1252  -*-
import mysql.connector
from pip._vendor.distlib import database


mydb = mysql.connector.connect(
  host="localhost",
  user="root",    
  passwd="root",
  database="springboot" 
)

print(mydb)
mycursor = mydb.cursor()
# mycursor.execute("CREATE DATABASE springboot")
# mycursor.execute("SHOW DATABASES")
# for x in mycursor:
#   print(x)

# mycursor.execute("CREATE TABLE user (user_acc VARCHAR(10), user_pwd VARCHAR(30))")

mycursor.execute("SHOW TABLES")
 
for x in mycursor:
  print(x)


# sql = "INSERT INTO user (user_acc, user_pwd) VALUES (%s, %s)"
# val = ("hhl", "123456")
# mycursor.execute(sql, val)
# mydb.commit()    # 数据表内容有更新，必须使用到该语句
# print(mycursor.rowcount, "记录插入成功。")

mycursor.execute("SELECT * FROM user")
 
# myresult = mycursor.fetchall()     # fetchall() 获取所有记录
# for x in myresult:
#   print(x)
  
  
myresult=mycursor.fetchone()
print(myresult)



class MyClass(object):
    '''
    classdocs
    '''


    def __init__(self, params):
        '''
        Constructor
        '''
        